
<style type="text/css">
a.thumbnail {
    color: #000000;
    display: block;
    text-decoration: none;
}
a.thumbnail:hover {
    color: #0096FF;
}
a.thumbnail img {
    opacity: 0.8;
}
a.thumbnail:hover img {
    border: 1px solid #0096FF;
    opacity: 1;
}
</style>
<div style="clear:both;background-image:url(img/top_menu2.png);width:660px;height:45px;">
<div style="width:100px;height:30px;position:relative;left:20px;top:10px;font-family:'Trebuchet MS', Arial, Helvetica, sans-serif;font-size:20px;color:white;">V&iacute;deos</div>
</div>

<div class="vid2">
<!--	<div style="position:relative;left:50px;">-->
    <?php
    $sql_video = mysql_query("SELECT url,id,legenda FROM video ORDER BY id DESC LIMIT 10  ");
    $count = 1;
    $total = mysql_num_rows($sql_video);
    while (list($url,$id,$legenda)=mysql_fetch_array($sql_video)){
            $youtubeVideo1 = $url;
            if ($count < 6 ){?>
    		<div id="video2">
            <?php }
            if($count >= 6){?>
        	<div id="video3">
            <?php //$count == 1;
			}
            ?>
            <?php
            $url2 = explode('=',$url);
            ?>
            <a class="thumbnail clearfix" style="text-decoration:none;" href="index.php?pagina=internas/busca_video.php&video=<?php echo base64_encode($id); ?>">
            <img id="vimg" src="http://i.ytimg.com/vi/<?php echo $url2[1]; ?>/default.jpg" />
            <center>
            	<span>
                	<font style="font-family:Arial, Helvetica, sans-serif;font-size:12px;">
						<?php 
                        if (strlen($legenda) > 45){ 
                            echo substr($legenda,0,45)." .....";
                        }else{
                            echo $legenda; 
                        } ?>
		            </font>
        	    </span>
            </center>
            </a>
            </div>
            
        <?php
        $count++;        
        }
        ?>
<!--	</div>        -->
</div>
